﻿Imports DAO
Imports DTO
Public Class CChiTietDiemMonHocBUS
    Public Function XemDuLieu(ByVal _DMHdto As CDiemMonHocDTO) As List(Of CChiTietDiemMonHocCRT)
        Dim _dao As New CChiTietDiemMonHocDAO()
        Dim _ds As New List(Of CChiTietDiemMonHocCRT)
        _ds = _dao.XemDuLieu(_DMHdto)
        Return _ds
    End Function

    Public Shared Sub ThemChiTietDiemMonHoc(ByVal _ds As List(Of CDiemMonHocDTO), ByVal _CTLdto As CChiTietLopDTO)
        Dim i As Integer
        Dim _CTDMHdto As New CChiTietDiemMonHocDTO()
        Dim _dao As New CChiTietDiemMonHocDAO()
        For i = 0 To _ds.Count - 1
            _CTDMHdto.MaHocSinh = _CTLdto.MaHocSinh
            _CTDMHdto.MaDiemMonHoc = _ds(i).MaDiemMonHoc
            _dao.ThemChiTietDiemMonHoc(_CTDMHdto)
        Next
    End Sub

    Public Function CapNhatChiTietDiemMonHoc(ByVal _dtt As DataTable) As Integer
        Dim _dao As New CChiTietDiemMonHocDAO()
        Dim _kt As Integer
        _kt = _dao.CapNhatChiTietDiemMonHoc(_dtt)
        Return _kt
    End Function

    Public Function LayDanhSachCTDMonHoc(ByVal _DMHdto As CDiemMonHocDTO) As DataTable
        Dim _dao As New CChiTietDiemMonHocDAO()
        Dim _dtt As New DataTable()
        _dtt = _dao.LayDanhSachCTDMonHoc(_DMHdto)
        Return _dtt
    End Function

End Class
